home *** CD-ROM | disk | FTP | other *** search
/ Merciful 5 / Merciful - Disc 5.iso / software / r / real_3d / real3dv3.3b.dms / real3dv3.3b.adf / GUI.LZH / GUI / spiral.gui < prev    next >
Text File  |  1995-03-26  |  2KB  |  102 lines

  1.  
  2. (
  3. ( Interface for rpl/spiral.rpl
  4. (
  5.  
  6. ?& SPIRAL_GUI NOT ?IF
  7. 1 CONSTANT SPIRAL_GUI
  8.  
  9. "ui.rpl" LOAD
  10. "locks.rpl" LOAD
  11.  
  12. ( Variables
  13.  
  14. VARIABLE spiaWindow
  15. VARIABLE spiaPartCnt
  16. VARIABLE spiaPartSize
  17. VARIABLE spiaRingCnt
  18. VARIABLE spiaPlanetSize
  19. VARIABLE spiaWireFrames
  20. VARIABLE spiaString
  21. VARIABLE spiaText
  22.  
  23. 160 CONSTANT spiiLeft
  24. 160 CONSTANT spiiWidth
  25. 12  CONSTANT spiiHeight
  26.  
  27. : spicbApply
  28.     VARIABLE iPartCnt
  29.     100 STRING sPartSize
  30.  
  31.     ( fetch attributes from gadgets
  32.     UI_Done iPartCnt UISL_Level spiaPartCnt FETCH UI_GETATTRS
  33.     UI_Done sPartSize UIST_String spiaPartSize FETCH UI_GETATTRS
  34.  
  35.     ( push parameters on stack
  36.     iPartCnt FETCH
  37.     sPartSize ATOF 
  38.  
  39.     ( and call the actual program 
  40.     "rpl/spiral.rpl" LOAD
  41.  
  42.     REFRESH
  43. ;
  44.  
  45. : spicbHelp
  46.  
  47. ;
  48.  
  49. : spicbCancel
  50.     spiaWindow FETCH UI_DELETE
  51.     FALSE spiaWindow STORE
  52. ;
  53.  
  54. : spicbWindow
  55.     PARAM
  56.         VARIABLE iMouseY
  57.         VARIABLE iMouseX
  58.         VARIABLE iEvent
  59.     ENDPARAM
  60.  
  61.     UIWM_Close iEvent FETCH = IF
  62.         spiaWindow FETCH UI_DELETE
  63.         FALSE spiaWindow STORE
  64.     ENDIF
  65. ;
  66.  
  67. ?ENDIF ( SPIRAL_GUI
  68.  
  69. ( Create display objects
  70. (
  71.  
  72. spiaWindow FETCH 
  73. ?IF
  74.     "Understood" "Interface already opened" GET_KEY DROP
  75. ?ELSE
  76.     UI_Done & spicbWindow 0 0 400 100 "Spiral Tool" UI_WINDOW spiaWindow STORE
  77.  
  78.     UI_Done 
  79.     "0.01" UIST_String
  80.     spiaWindow FETCH NULL spiiLeft 20 spiiWidth spiiHeight "Size for Particles" UI_STRING spiaPartSize STORE
  81.  
  82.     UI_Done 
  83.     1    UISL_Min
  84.     1000 UISL_Max
  85.     20   UISL_Level
  86.     spiaWindow FETCH NULL spiiLeft 35 spiiWidth spiiHeight "Number of Spheres" UI_SLIDER spiaPartCnt STORE
  87.  
  88.     UI_Done 
  89.     "Define parameters for spiral" UITX_Text
  90.     1 UITX_Border
  91.     spiaWindow FETCH NULL 60 60 320 spiiHeight "Info" UI_TEXT spiaText STORE
  92.  
  93.     UI_Done spiaWindow FETCH & spicbApply  20  80 100 spiiHeight "Apply"  UI_BUTTON DROP
  94.     UI_Done spiaWindow FETCH & spicbHelp   140 80 100 spiiHeight "Help"   UI_BUTTON DROP
  95.     UI_Done spiaWindow FETCH & spicbCancel 280 80 100 spiiHeight "Cancel" UI_BUTTON DROP
  96.  
  97.     ( realize gadgets
  98.  
  99.     spiaWindow FETCH UI_REALIZE
  100. ?ENDIF
  101.